<template>
  <div class="pro-detail">
    <van-swipe class="swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item>
        <img src="https://color-xu.gitee.io/resource/FrontWeb/images/bnr1.png" />
      </van-swipe-item>
      <van-swipe-item>
        <img src="https://color-xu.gitee.io/resource/FrontWeb/images/bnr1.png" />
      </van-swipe-item>
    </van-swipe>
    <!-- 选择规格 -->
    <van-cell title="单元格" is-link @click="showSku = true" />
    <sku v-model:show-sku="showSku" @close="showSku = false" />
  </div>
</template>
<script>
import { useStore } from 'vuex'
import Sku from '../components/Sku.vue'

export default {
  name: "ProDetail",
  components: {
    Sku,
  },
  data() {
    return {
      showSku: false,
    }
  },
  setup() {
    const store = useStore()
    const tabsActive = store.state.home.navIndex

    return {
      tabsActive,
    }
  },
  methods: {
    tabChange(active) {
      this.$store.commit('home/setNavIndex', active)
    },
  },
}
</script>
<style lang="scss" scoped>
.pro-detail {
  .swipe {
    img {
      width: 100%;
    }
  }
}
</style>